package 
{	
	import kizzo.game.BrushMenu;
	import kizzo.gui.PropertyMenu;
	
	public class Editor
	{
		private static var instance:Editor;
		private static var allow_instantiation:Boolean;
		
		private var game:Main;	
		
		public var edit_menu:PropertyMenu;
		public var brush_menu:BrushMenu;		
		public var brush_menu_visible:Boolean = false;		
				
		
		public static function get_instance():Editor 
		{
			if (instance == null) 
			{
				allow_instantiation = true;
				instance = new Editor();
				allow_instantiation = false;
			}
			return instance;
		}
				
		
		public function Editor():void 
		{
			if (!allow_instantiation) 
			{
				throw new Error("Error: Instantiation failed: Use Editor.get_instance() instead of new.");
			}
			
			this.game = Main.get_instance();
			this.brush_menu = new BrushMenu();
			this.edit_menu = new PropertyMenu(500, 200);
		}
		
	}
}